package com.qfjy.shichengyong.dynamicproxy;

/**
 * @author:scy
 * @date:2022/9/13 19:31
 * @version:1.0
 */
public class MonitorUtil {

    private static ThreadLocal<Long> t1 = new ThreadLocal<>();

    public static void start(){
        t1.set(System.currentTimeMillis());
    }

    public static void finish(String methodName){
        Long finishTime = System.currentTimeMillis();
        System.out.println(methodName + "方法耗时" + (finishTime - t1.get()) + "ms");
    }
}
